package com.university;

import java.util.Collection;
import java.util.Hashtable;
import java.util.Vector;

public class FakeDBInterface {

	private Hashtable<String, Vector<Lecture>> fakeLectureDB;
	
	public FakeDBInterface() {
		super();
		fakeLectureDB=new Hashtable<String, Vector<Lecture>>();
		
		Vector<Lecture> lectures=new Vector<Lecture>();
		lectures.add(new Lecture("3D game programming","Harri Airaksinen" , 2));
		lectures.add(new Lecture("Game AI","Harri Airaksinen" , 2));
		lectures.add(new Lecture("Web databases","Harri Airaksinen" , 4));
		fakeLectureDB.put("Harri Airaksinen", lectures);

		lectures=new Vector<Lecture>();
		lectures.add(new Lecture("Digital systems","Oleg Bouljanov" , 2));
		lectures.add(new Lecture("Microcontroller programming","Oleg Bouljanov" , 4));
		lectures.add(new Lecture("Advanced Assembly","Oleg Bouljanov" , 4));
		fakeLectureDB.put("Oleg Bouljanov", lectures);
		
	}

	public Collection<Lecture> getLectures(String professorName)
	{
		if(fakeLectureDB.containsKey(professorName))
		{
			return fakeLectureDB.get(professorName);
		}else
		{
			return new Vector<Lecture>();
		}
	}
	
}
